home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / wgdb-42.lha / wgdb-4.2 / gdb / configure.in < prev    next >
Text File  |  1992-09-11  |  5KB  |  295 lines

  1. srcname="GDB"
  2. srctrigger=main.c
  3.  
  4. # per-host:
  5.  
  6. # map host info into gdb names.
  7.  
  8. case "${host_cpu}" in
  9.  
  10. m68k)
  11.     case "${host_vendor}" in
  12.     att)    gdb_host=3b1 ;;
  13.     altos)
  14.         case "${host_os}" in
  15.         gas)    gdb_host=altosgas ;;
  16.         *)    gdb_host=altos ;;    
  17.         esac
  18.         ;;
  19.  
  20.     cbm)
  21.         case ${host_os} in
  22.         amigados)    gdb_host=amigados ;;
  23.         svr4)        gdb_host=amix ;;
  24.         esac
  25.         ;;
  26.  
  27.     hp)
  28.         case ${host_os} in
  29.         hpux)    gdb_host=hp300hpux ;;
  30.         bsd)    gdb_host=hp300bsd ;;
  31.         esac
  32.         ;;
  33.  
  34.     isi)    gdb_host=isi ;;
  35.     sony)    gdb_host=news ;;
  36.     sun)
  37.         case "${host_os}" in
  38.         sunos3)    gdb_host=sun3os3 ;;
  39.         sunos4)    gdb_host=sun3os4 ;;
  40.         *)    gdb_host=sun3 ;;
  41.         esac
  42.         ;;
  43.     esac
  44.     ;;
  45.  
  46. m68000)
  47.     case "${host_vendor}" in
  48.     sun)
  49.         case "${host_os}" in
  50.         sunos3)    gdb_host=sun2os3 ;;
  51.         sunos4)    gdb_host=sun2os4 ;;
  52.         *)    gdb_host=sun2 ;;
  53.         esac
  54.     esac
  55.     ;;
  56.  
  57. sparc)
  58.     case "${host_os}" in
  59.     sunos3)    gdb_host=sun4os3 ;;
  60.     sunos4)    gdb_host=sun4os4 ;;
  61.     *)    gdb_host=sun4 ;;
  62.     esac
  63.     ;;
  64.  
  65. m68030)
  66.     case "${host_vendor}" in
  67.     sony)    gdb_host=news1000 ;;
  68.     esac
  69.     ;;
  70.  
  71. mips)
  72.     case "${host_vendor}" in
  73.     sony)    gdb_host=bigmips ;;
  74.     dec)    gdb_host=decstation ;;
  75.     little)    gdb_host=littlemips ;;
  76.     sgi)    gdb_host=irix3 ;;
  77.     esac
  78.     ;;
  79.  
  80. i386)
  81.     case "${host_vendor}" in
  82.     sun)    gdb_host=sun386 ;;
  83.     sco)    gdb_host=i386sco ;;
  84.     sequent)    gdb_host=symmetry ;;
  85.     *)
  86.         case "${host_os}" in
  87.         sysv)    gdb_host=i386v ;;
  88.         sysv32)    gdb_host=i386v32 ;;
  89.         mach)    gdb_host=i386mach ;;
  90.         esac
  91.         ;;
  92.     esac
  93.     ;;
  94.  
  95. c1 | c2)    gdb_host=convex ;;
  96.  
  97. ns32k)
  98.     case "${host_vendor}" in
  99.     umax)    gdb_host=umax ;;
  100.     esac
  101.     ;;
  102.  
  103. romp)
  104.     gdb_host=rtbsd
  105.     ;;
  106.  
  107. a29k)
  108.     gdb_host=ultra3
  109.     ;;
  110.  
  111. arm | vax | m88k | merlin | none | np1 | pn | pyramid | tahoe)
  112.     gdb_host=${host_cpu}
  113.     ;;
  114.  
  115. ### unhandled hosts
  116. #altosgas
  117. #i386v-g
  118. #i386v32-g
  119.  
  120. esac
  121.  
  122. if [ ! -f xconfig/${gdb_host} ]; then
  123.     echo '***' "Gdb does not support host ${host}" 1>&2
  124.     exit 1
  125. fi
  126.  
  127. #  We really shouldn't depend on there being a space after XM_FILE= ...
  128. hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <xconfig/${gdb_host}`
  129.  
  130. # per-target:
  131.  
  132. case "${target_cpu}" in
  133.  
  134. m68k)
  135.     case "${target_vendor}" in
  136.     att)    gdb_target=3b1 ;;
  137.     altos)    gdb_target=altos ;;
  138.     cbm)
  139.         case ${target_os} in
  140.         amigados)    gdb_host=amigados ;;
  141.         svr4)        gdb_target=amix ;;
  142.         esac
  143.         ;;
  144.     hp)
  145.         case "${target_os}" in
  146.         bsd)    gdb_target=hp300bsd ;;
  147.         hpux)    gdb_target=hp300hpux ;;
  148.         esac
  149.         ;;
  150.     sun)
  151.         case "${target_os}" in
  152.         sunos3)    gdb_target=sun3os3 ;;
  153.         sunos4)    gdb_target=sun3os4 ;;
  154.         *)    gdb_target=sun3 ;;
  155.         esac
  156.         ;;
  157.     wrs)    gdb_target=vxworks68 ;;
  158.     isi)    gdb_target=isi ;;
  159.     sony)    gdb_target=news ;;
  160.     esac
  161.     ;;
  162.  
  163. m68000)
  164.     case "${target_vendor}" in
  165.     sun)
  166.         case "${target_os}" in
  167.         sunos3)    gdb_target=sun2os3 ;;
  168.         sunos4)    gdb_target=sun2os4 ;;
  169.         *)    gdb_target=sun2 ;;
  170.         esac
  171.     esac
  172.     ;;
  173.  
  174. m68030)
  175.     case "${target_vendor}" in
  176.     sony)    gdb_target=news1000 ;;
  177.     esac
  178.     ;;
  179.  
  180. none | arm | tahoe | vax | np1 | pn | np1 | pn | pyramid | merlin | m88k)
  181.     gdb_target=${target_cpu} ;;
  182.  
  183. a29k)
  184.     case "${target_os}" in
  185.     none|aout|coff)    gdb_target=a29k ;;
  186.     sym1)    gdb_target=ultra3 ;;
  187.     kern)    gdb_target=a29k-kern ;;
  188.     esac
  189.     ;;
  190.     
  191. mips)
  192.     case "${target_vendor}" in
  193.     sony)    gdb_target=bigmips ;;
  194.     dec)    gdb_target=decstation ;;
  195.     little)    gdb_target=littlemips ;;
  196.     sgi)    gdb_target=irix3 ;;
  197.     esac
  198.     ;;
  199.  
  200. c1 | c2)    gdb_target=convex ;;
  201.  
  202. sparc)
  203.     case "${target_vendor}" in
  204.     sun)
  205.         case "${target_os}" in
  206.         sunos3)    gdb_target=sun4os3 ;;
  207.         sunos4)    gdb_target=sun4os4 ;;
  208.         *)    gdb_target=sun4 ;;
  209.         esac
  210.         ;;
  211.     esac
  212.     ;;
  213.  
  214.  
  215. i386)
  216.     case "${target_vendor}" in
  217.     sco)    gdb_target=i386sco ;;
  218.     sun)    gdb_target=sun386 ;;
  219.     sequent)    gdb_target=symmetry ;;
  220.     coff)    gdb_target=i386v ;;
  221.     aout)    gdb_target=i386v ;;
  222.     *)
  223.         case "${target_os}" in
  224.         sysv)    gdb_target=i386v ;;
  225.         sysv32)    gdb_target=i386v32 ;;
  226.         mach)    gdb_target=i386mach ;;
  227.         esac
  228.     esac
  229.     ;;
  230.  
  231. i960)
  232.     case "${target_vendor}" in
  233.     bout | wrs)    gdb_target=vxworks960 ;;
  234.     coff | intel)    gdb_target=nindy960 ;;
  235.     esac
  236.     ;;
  237.  
  238. ns32k)
  239.     case "${target_vendor}" in
  240.     utek)    gdb_target=umax ;;
  241.     esac
  242.     ;;
  243.  
  244. ### unhandled targets
  245. # altosgas
  246. # i386v-g
  247. # i386v32-g
  248.  
  249. esac
  250.  
  251. if [ ! -f tconfig/${gdb_target} ]; then
  252.     echo '***' "Gdb does not support target ${target}" 1>&2
  253.     exit 1
  254. fi
  255.  
  256. if [ -z "${removing}" ] ; then
  257.     cat xconfig/${gdb_host} tconfig/${gdb_target} | awk '$1 == "#msg" {
  258.         print substr($0,6)}'
  259. fi
  260.  
  261. #  We really shouldn't depend on there being a space after TM_FILE= ...
  262. targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <tconfig/${gdb_target}`
  263.  
  264. host_makefile_frag=xconfig/${gdb_host}
  265. target_makefile_frag=tconfig/${gdb_target}
  266.  
  267. # If hostfile (XM_FILE) and/or targetfile (TM_FILE) is not set in the
  268. # ?config/* file, we don't make the corresponding links.  But we have
  269. # to remove the xm.h files and tm.h files anyway, e.g. when switching
  270. # from "configure host" to "configure none".
  271. files=
  272. links=
  273. rm -f xm.h
  274. if [ "${hostfile}" != "" ]; then
  275.     files="${files} ${hostfile}"
  276.     links="${links} xm.h"
  277. fi
  278. rm -f tm.h
  279. if [ "${targetfile}" != "" ]; then
  280.     files="${files} ${targetfile}"
  281.     links="${links} tm.h"
  282. fi
  283.  
  284. # post-target:
  285.  
  286. case ${srcdir} in
  287.   .)
  288.     ;;
  289.   *)
  290.     grep -s "source ${srcdir}/.gdbinit" .gdbinit 2>/dev/null || \
  291.       echo "source ${srcdir}/.gdbinit" >> .gdbinit
  292. esac
  293.  
  294. cat ${srcdir}/alldeps.mak ${srcdir}/depend >>Makefile
  295.